
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode:"history",
 /* linkActiveClass:"current_ele",*/
  base:__dirname,
  routes: [
    {
      path: '/',
      name: 'Hello',
      component:resolve=> require(['@/components/Hello'], resolve),
    },
    {
      path: '/signUp',
      name: 'signUp',
      component:resolve=> require(['@/pages/signUp'], resolve),
    },
    {
      path: '/signIn',
      name: 'signIn',
      component:resolve=> require(['@/pages/signIn'], resolve),
    },
    {
      path: '/article/create',
      name: 'ArticleCreate',
      component:resolve=> require(['@/pages/article/create'], resolve),
      meta: {
        needLogin: true
      }
    },
    {
      path: '/article',
      name: 'ArticleList',
      component:resolve=> require(['@/pages/article/articleList'], resolve),
    },
    {
      path: '/article/:id',
      name: 'ArticleShow',
      component:resolve=> require(['@/pages/article/index'], resolve),
    },
    {
      path: '/article/:id/edit',
      name: 'ArticleEdit',
      component:resolve=> require(['@/pages/article/edit'], resolve),
      meta: {
        needLogin: true
      }
    },
    {
      path: '/user/:id',
      name: 'User',
      component:resolve=> require(['@/pages/user/index'], resolve),
    },
    {
      path: '/setUserInfo/:id',
      name: 'setUserInfo',
      component:resolve=> require(['@/pages/user/setUserInfo'], resolve),
      meta: {
        needLogin: true
      }
    },
    {
      path: '/followee',
      nanme: 'Followee',
      component:resolve=> require(['@/pages/user/myFollowee'], resolve),
      meta: {
        needLogin: true
      }
    },

    {
      path: '/follower',
      nanme: 'Follower',
      component:resolve=> require(['@/pages/user/myFollower'], resolve),
      meta: {
        needLogin: true
      }
    },
    {
      path: '/friend',
      nanme: 'Friend',
      component:resolve=> require(['@/pages//user/fd'], resolve),
      meta: {
        needLogin: true
      }
    },
    {
      path: '/message',
      nanme: 'Message',
      component:resolve=> require(['@/pages/user/message'], resolve),
      meta: {
        needLogin: true
      }
    }

  ]
})
